The present application relates generally to an improved data processing apparatus and method, and more specifically to mechanisms for assigning cache priorities to virtual/logical processors and partitioning a cache according to such priorities.
Logical partitioning of computer resources allows the establishment of multiple system images within a single physical machine or processor complex. Virtualization is a term designating system imaging in which each system image, known also as a virtual machine (VM), operates in a logically independent manner from the other VMs using shared resources of the physical computer system. In this manner, each logical partition corresponding to a VM can be independently reset, loaded with an operating system that may be different for each partition, and operate with different software programs using different input/output (I/O) devices. Commercial embodiments of logically partitioned systems include, for example, International Business Machines (IBM) Corporation's POWERS multiprocessor architecture.
An important aspect of logical partitioning is management of the respective partition workloads. In POWERS, for example, a workload manager called a hypervisor manages the workload among the partitions. In this type of shared resource environment, the hypervisor allocates physical system resources such as memory, central processing units (CPUs), I/O, etc., to the logical partitions using an interleaved time slot scheduling technique similar in a broad sense to general multitask computing scheduling. The hypervisor attempts to balance the workload of the partitions by dispatching partition work as logical processors to the physical system resources on an as-needed and/or pre-allocated manner.
One aspect of partition scheduling relates specifically to processor resource utilization and sharing. Namely, partitions using processor capacity from a shared processor pool are defined as either capped or uncapped for scheduling purposes. A capped partition cannot exceed its configured processor entitlement. Uncapped support for logical partitions enables uncapped partitions to exceed their configured capacity in situations where there is unutilized capacity in the shared processor pool. Such unutilized capacity results from other partitions underutilizing all of their configured capacity or the capacity of the shared pool otherwise not being completely allocated.
When dispatched, a logical partition subsumes the allocated physical processor resources as a virtual processor. The scheduling of virtual processors entails allocating pre-specified periods of time, or time slices, during which processing cycles, memory, and other physical system resources are allocated for use by the partitions during a given dispatch window. The AIX operating system running on POWERS, for example, has a default 10 milliseconds dispatch window. Any unused portion of an allocated dispatch window may be allocated to one or more of the uncapped partitions in the system. A lottery mechanism based on the uncapped partitions' priority levels is often utilized to determine which uncapped partition will replace the originally scheduled partition for the unused portion of the dispatch window.
With the PowerVM technology, a system can be configured to have more logical partitions, and thus, logical or virtual processors, than available physical processors as the logical partitions are allowed to have entitlements to the physical processors and system resources in fractional units. The hypervisor ensures that all the logical partitions, as logical or virtual processors, are allotted their share within the dispatch window of time. As a result, logical or virtual processors may end up sharing a physical processor and its resources in a serial way, i.e. one after another.
The physical processors along with their caches that are shared in this manner pose an issue to performance of the system as a whole. As each logical or virtual processor is given its allotment of system resources, the logical or virtual processor clears out the contents of the previous logical or virtual processor's cached data if the current logical or virtual processor's working set of data is different from the previous working set of the previous logical or virtual processor. This impacts performance of the virtual processors as it causes the virtual processors to start with a cold cache at every dispatch window. A cold cache causes cache misses initially until the required data is retrieved from system memory and placed in the cache, thereby causing extra overhead costs with regard to processor cycles to check the cache, determine the cache miss, and retrieve the required data from system memory.